var service = require('../../utilService.js')

Component({
  /**
   * 组件的属性列表
   */
  properties: {
    data: {
      type: Object,
      value: null,
      observer: function(newValue, oldValue) {
        this.setData({ cover: service.configCover(newValue.cover)})
      }
    },
  },

  /**
   * 组件的初始数据
   */
  data: {
    status: '',
    cover: ''
  },

  /**
   * 组件的方法列表
   */
  methods: {
    itemClick() {
      console.log(this.properties.data)
      wx.navigateTo({
        url: "/goods/pages/goodsDetails/goodsDetails?goods_id=" + this.properties.data.goodsId + '&goods_type=' + this.properties.data.goodsSaleType
      })
    }
  }
})
